package com.flyduck.vueshop.order.h5.controller;

import com.flyduck.vueshop.common.core.lang.Result;
import com.flyduck.vueshop.common.sotoken.annotation.Login;
import com.flyduck.vueshop.order.h5.service.H5DeliveryService;
import com.flyduck.vueshop.order.h5.vo.H5DeliveryRespVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * H5DeliveryController
 * </p>
 *
 * @author flyduck
 * @since 2024-07-24
 */
@RestController
@RequestMapping("/order/h5/delivery")
public class H5DeliveryController {

    @Resource
    private H5DeliveryService h5DeliveryService;

    @Login
    @GetMapping("/getDeliveryById/{id}")
    public Result<H5DeliveryRespVO> getDeliveryById(@PathVariable("id")Long id) throws Exception {
        return Result.success(h5DeliveryService.getDeliveryById(id));
    }
}
